﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WZ.Common
{
    public static class DateTimeHelper
    {
        public static string DateTimeToUnixTimestamp(this DateTime dateTime)
        {
            var start = new DateTime(1970, 1, 1, 0, 0, 0, dateTime.Kind);
            return Convert.ToInt64((dateTime - start).TotalSeconds).ToString();
        }
    }
}
